        
        
        var animate = null;
        $(document).ready(function(){
            /*if(window.history.length == 1 || window.performance.navigation.type == 1){
                animateDelayCount = 2200;
            }else{
                animateDelayCount = 550;
            }*/
            var animations = [];
            for(var l = 0;l < $('.ready').length;l++){
                $('.ready')[l].anmtInd = l;
                animations.push($('.ready')[l]);
            }
            animate = setInterval(function(){
                if(beginningDelay != null){
                    beginningDelay += 10;
                    if(beginningDelay <= animateDelayCount) return false;
                }
                if(!animations.length){
                    clearInterval(animate);
                };
                for(var r = 0;r < animations.length;r++){
                    var className = animations[r].className;
                    var ele_h = animations[r].offsetHeight;
                    var ele_top = animations[r].getBoundingClientRect().top;
                    var window_h = window.innerHeight;
                    if(className.indexOf('overHalf') >= 0){
                        ele_top += ele_h / 2;
                    }
                    //console.log(animations);
                    if(
                        (className.indexOf('overself') < 0 && ((ele_top >= 0 && ele_top < window_h) || (ele_top < 0 && ele_top > -ele_h)))
                            ||
                            (className.indexOf('overself') >= 0 && ele_top <= window_h - ele_h)
                        ){
                            var ind = animations[r].anmtInd;
                            $('.ready:eq(' + ind +')').addClass('frozen'); 
                            animations.splice(r,1);
                            if(!animations.length){
                                clearInterval(animate);
                            }
                    }
                }
            },10);
            
        }) 